package com.liu.algorithm.strategy;

/**
 * @author LIU
 * @version 1.0
 * @description: TODO
 * @date 2022/8/25 11:04
 */

public class Cat implements Comparable<Cat> {
    private int height;

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "height=" + height +
                '}';
    }


    @Override
    public int compareTo(Cat c) {
        if (this.height > c.height) {
            return 1;
        } else if (this.height < c.height) {
            return -1;
        }
        return 0;
    }
}
